<?php
namespace app\lib\exception;

use Exception;

class BaseException extends Exception
{
    public $code = 400;
    public $msg = '异常';
    public $errCode = 999; 

    public function __construct($param = []){
        // halt($param);
        if (!is_array($param)) {
            return;
        }

        if (array_key_exists('code', $param)) { $this->code = $param['code'];}
        if (array_key_exists('msg', $param)) { $this->msg = $param['msg'];}
        if (array_key_exists('errCode', $param)) { $this->errCode = $param['errCode'];}
    }
}
